<template>
	<view>
		
		<fui-nav-bar isOccupy isFixed background="#0052D9" title="审批意见" color="#fff" @leftClick="leftClick">
		  <fui-icon color="#fff" name="arrowleft"></fui-icon>
		</fui-nav-bar>
		
		<view class="title">
			审批意见
		</view>
		<u--textarea v-model="value2" placeholder="请输入审批意见" count maxlength="3000" border="none"  height="220"></u--textarea>
		
			<view v-if="type==1"  class="footer" @click="clickBtn">
			  <view class="recall">确认通过</view>
			</view>
			<view v-else class="footer">
			  <view class="recall">确认驳回</view>
			</view>
			
			<view  v-if="type==2" class="pass">
				<fui-input v-model="emergency" label="驳回节点" :bottomLeft="1" placeholder="请选择驳回节点">
				  <fui-icon :size="50" name="arrowright" @click="show = true"></fui-icon>
				</fui-input>
			</view>
			
			<fui-picker :options="options" :show="show" @change="change" @cancel="cancel"></fui-picker>
		
	</view>
</template>

<script setup>
import { ref,reactive } from 'vue';
const leftClick = () => {
	uni.navigateBack()
}


const show = ref(false);
const emergency = ref('');
const options = ref(['领用申请', '部门领导审批', '仓库人员审核', '仓库领导审核']);

const change = (e) => {
  show.value = false;
  emergency.value = e.value;
  console.log(e, '5656');
};

const cancel = () => {
  show.value = false;
};

const type = ref(2); // 1通过 2驳回
</script>

<style lang="scss" scoped>
	page {
	  background-color: #f6f6f6;
	}
	.title{
		padding: 20rpx;
		background-color: #fff;
	}
.footer {
  // position: fixed;
  // top: 50;
  // button: 20;
  position: fixed;
  bottom: 0;
  background-color: #fff;
  z-index: 5;
  border-top: 1px solid #ccc;
  height: 150rpx;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: space-around;
  .recall {
    background-color: #0052d9;
    width: 90%;
    border-radius: 5rpx;
    height: 80rpx;
    display: flex;
    align-items: center;
    justify-content: space-around;
    color: #ffffff;
  }
}
</style>
